package cn.tedu.spring.resource;

import cn.tedu.spring.eg2.Mapper;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 董代恒
 * @version 1.0
 */
public class TestWeiBoMapper {
    public static void main(String[] args) {
        //1.创建Ioc容器
        ApplicationContext context = new AnnotationConfigApplicationContext("cn.tedu.spring.resource");
        //2.获取bean对象
        RestMapper restMapperImpl1 = context.getBean("restMapperImpl1",RestMapper.class);
//        RestMapper restMapperImpl2 = context.getBean("restMapperImpl2",RestMapper.class);
        //3.打印bean对象地址

        System.out.println(restMapperImpl1);
//        System.out.println(restMapperImpl2);
    }
}
